home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
10,000 Great Games
/
10,000 Great Games.iso
/
Product
/
66
/
data1.cab
/
Source_Files
/
Src
/
BlasterDoc.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2000-01-16
|
1KB
|
74 lines
#include "stdafx.h"
IMPLEMENT_DYNCREATE(CBlasterDoc, CDocument)
BEGIN_MESSAGE_MAP(CBlasterDoc, CDocument)
//{{AFX_MSG_MAP(CBlasterDoc)
ON_COMMAND(ID_FILE_SAVE, OnFileSave)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
CBlasterDoc::CBlasterDoc()
{
}
CBlasterDoc::~CBlasterDoc()
{
}
BOOL CBlasterDoc::OnNewDocument()
{
CWaitCursor wait;
if (!CDocument::OnNewDocument())
{
generate_random = FALSE;
return FALSE;
}
init_game_loop();
if (generate_random)
make_level();
generate_random = FALSE;
return TRUE;
}
void CBlasterDoc::Serialize(CArchive &ar)
{
CWaitCursor wait;
if (ar.IsStoring())
{
save_level(ar.GetFile());
}
else
{
init_game_loop();
load_level(ar.GetFile());
}
}
#ifdef _DEBUG
void CBlasterDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CBlasterDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif
void CBlasterDoc::DeleteContents()
{
deinit_game_loop();
CDocument::DeleteContents();
}